using System.Collections.Generic;
using Foreglance.MVP.Delegates;

namespace Foreglance.MVP.Models
{
    public interface IModel<TEntity> : IEntityModel
    {
        event ObjectListEventHandler<TEntity> OnEntitiesSelectionChanged;
        event ObjectListEventHandler<TEntity> OnEntitiesAdded;
        event ObjectListEventHandler<TEntity> OnEntitiesEdited;
        event ObjectListEventHandler<TEntity> OnEntitiesDeleted;
        void LoadEntities();
        void AddEntities();
        void EditEntities();
        void DeleteEntities();
        List<TEntity> Entities { get; }
        List<TEntity> SelectedEntities { get; set; }
        TEntity Entity { get; set; }
    }
}